<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::LinearRegression Class Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_linear_regression.html">LinearRegression</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_linear_regression-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::LinearRegression Class Reference<div class="ingroups"><a class="el" href="group__supervised__trainer.html">Supervised Trainers</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Linear Regression.  
 <a href="classshark_1_1_linear_regression.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_linear_regression_8h_source.html">shark/Algorithms/Trainers/LinearRegression.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::LinearRegression:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_linear_regression__inherit__graph.png" border="0" usemap="#ashark_1_1_linear_regression_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_linear_regression_inherit__map" id="ashark_1_1_linear_regression_inherit__map">
<area shape="rect" title="Linear Regression." alt="" coords="89,94,251,120"/>
<area shape="rect" href="classshark_1_1_abstract_trainer.html" title=" " alt="" coords="5,5,156,46"/>
<area shape="poly" title=" " alt="" coords="116,54,158,91,154,95,112,58"/>
<area shape="rect" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters." alt="" coords="180,5,339,46"/>
<area shape="poly" title=" " alt="" coords="228,58,185,95,182,91,224,54"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a33f1e9c741616f6cb5e64953bc721b66" id="r_a33f1e9c741616f6cb5e64953bc721b66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a33f1e9c741616f6cb5e64953bc721b66">LinearRegression</a> (double <a class="el" href="classshark_1_1_linear_regression.html#a178a2c8fc36f020fd353256fa8d044ab">regularization</a>=0.0)</td></tr>
<tr class="separator:a33f1e9c741616f6cb5e64953bc721b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f7dced7c5b2ca4e56e876d3dec7a2e7" id="r_a9f7dced7c5b2ca4e56e876d3dec7a2e7"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a9f7dced7c5b2ca4e56e876d3dec7a2e7">name</a> () const</td></tr>
<tr class="memdesc:a9f7dced7c5b2ca4e56e876d3dec7a2e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a9f7dced7c5b2ca4e56e876d3dec7a2e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a178a2c8fc36f020fd353256fa8d044ab" id="r_a178a2c8fc36f020fd353256fa8d044ab"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a178a2c8fc36f020fd353256fa8d044ab">regularization</a> () const</td></tr>
<tr class="separator:a178a2c8fc36f020fd353256fa8d044ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4781b500d756133ffc8621ee519c2ae" id="r_ab4781b500d756133ffc8621ee519c2ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#ab4781b500d756133ffc8621ee519c2ae">setRegularization</a> (double <a class="el" href="classshark_1_1_linear_regression.html#a178a2c8fc36f020fd353256fa8d044ab">regularization</a>)</td></tr>
<tr class="separator:ab4781b500d756133ffc8621ee519c2ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1cf68783fe0cd6ecc5e7a03f2043017" id="r_ac1cf68783fe0cd6ecc5e7a03f2043017"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#ac1cf68783fe0cd6ecc5e7a03f2043017">parameterVector</a> () const</td></tr>
<tr class="memdesc:ac1cf68783fe0cd6ecc5e7a03f2043017"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the parameter vector.  <br /></td></tr>
<tr class="separator:ac1cf68783fe0cd6ecc5e7a03f2043017"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0685536ee2f4abd6d739ccd86a541c41" id="r_a0685536ee2f4abd6d739ccd86a541c41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a0685536ee2f4abd6d739ccd86a541c41">setParameterVector</a> (const RealVector &amp;param)</td></tr>
<tr class="memdesc:a0685536ee2f4abd6d739ccd86a541c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the parameter vector.  <br /></td></tr>
<tr class="separator:a0685536ee2f4abd6d739ccd86a541c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a335aac86961275889106ef90b51f64b0" id="r_a335aac86961275889106ef90b51f64b0"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a335aac86961275889106ef90b51f64b0">numberOfParameters</a> () const</td></tr>
<tr class="memdesc:a335aac86961275889106ef90b51f64b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of parameters.  <br /></td></tr>
<tr class="separator:a335aac86961275889106ef90b51f64b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ca068abe50a7b1eb03305e2cc21c4c5" id="r_a7ca068abe50a7b1eb03305e2cc21c4c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a7ca068abe50a7b1eb03305e2cc21c4c5">train</a> (<a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;model, <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, RealVector &gt; const &amp;dataset)</td></tr>
<tr class="separator:a7ca068abe50a7b1eb03305e2cc21c4c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; LinearModel&lt;&gt; &gt;</a></td></tr>
<tr class="memitem:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer" id="r_a71d3fd2567473d746ecb733d7fa28c7e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a71d3fd2567473d746ecb733d7fa28c7e">train</a> (<a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a> const &amp;dataset)=0</td></tr>
<tr class="memdesc:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Core of the Trainer interface.  <br /></td></tr>
<tr class="separator:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_nameable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_nameable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_nameable.html">shark::INameable</a></td></tr>
<tr class="memitem:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable" id="r_a877dbdfc6b58ea836495143cea44a98c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_nameable.html#a877dbdfc6b58ea836495143cea44a98c">~INameable</a> ()</td></tr>
<tr class="separator:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable" id="r_ad4ad9a7c274deff642f91e98417fbc63"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#ad4ad9a7c274deff642f91e98417fbc63">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the component from the supplied archive.  <br /></td></tr>
<tr class="separator:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable" id="r_a9bddedd42933c922e323b73131f62f12"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a9bddedd42933c922e323b73131f62f12">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the component to the supplied archive.  <br /></td></tr>
<tr class="separator:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable" id="r_a9e3a11172e74d1aa7292f3de4e2b6ebc"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a9e3a11172e74d1aa7292f3de4e2b6ebc">~IParameterizable</a> ()</td></tr>
<tr class="separator:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a1b3c7e48f0eee81cbb99fd05aa3e7571" id="r_a1b3c7e48f0eee81cbb99fd05aa3e7571"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_linear_regression.html#a1b3c7e48f0eee81cbb99fd05aa3e7571">m_regularization</a></td></tr>
<tr class="separator:a1b3c7e48f0eee81cbb99fd05aa3e7571"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; LinearModel&lt;&gt; &gt;</a></td></tr>
<tr class="memitem:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0d5c9d35b614d6a33e4e8bfeaf1e9298"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a></td></tr>
<tr class="separator:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0cfa7cdd27b8bb162e64188095f8fa71"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_model.html#a714e85d7a6cd2b68898cb5dbb25c37d4">ModelType::InputType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a></td></tr>
<tr class="separator:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4e344106831fb8227c2120681588ea9"><td class="memItemLeft" align="right" valign="top">typedef typename Model::OutputType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a></td></tr>
<tr class="separator:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4730fe9d59622d35d95cd4233f8d7af"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a></td></tr>
<tr class="separator:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable" id="r_a2ad5e2e60b2b352988b41f46024d790b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="_c_svm_linear_8cpp.html#ab106d665148183a2dc94dcf8716c9203">VectorType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a2ad5e2e60b2b352988b41f46024d790b">ParameterVectorType</a></td></tr>
<tr class="separator:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Linear Regression. </p>
<p>Linear Regression builds an affine linear model \( f(x) = A x + b \) minimizing the squared error from a dataset of pairs of vectors (x, y). That is, the error \( \sum_i (f(x_i) - y_i)^2 \) is minimized. The solution to this problem is found analytically. </p>

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00060">60</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a33f1e9c741616f6cb5e64953bc721b66" name="a33f1e9c741616f6cb5e64953bc721b66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33f1e9c741616f6cb5e64953bc721b66">&#9670;&#160;</a></span>LinearRegression()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> shark::LinearRegression::LinearRegression </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>regularization</em> = <code>0.0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9f7dced7c5b2ca4e56e876d3dec7a2e7" name="a9f7dced7c5b2ca4e56e876d3dec7a2e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f7dced7c5b2ca4e56e876d3dec7a2e7">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string shark::LinearRegression::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_nameable.html#a9893f99314de30cd472e649c235d0db4">shark::INameable</a>.</p>

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00066">66</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

</div>
</div>
<a id="a335aac86961275889106ef90b51f64b0" name="a335aac86961275889106ef90b51f64b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a335aac86961275889106ef90b51f64b0">&#9670;&#160;</a></span>numberOfParameters()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t shark::LinearRegression::numberOfParameters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the number of parameters. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00086">86</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

</div>
</div>
<a id="ac1cf68783fe0cd6ecc5e7a03f2043017" name="ac1cf68783fe0cd6ecc5e7a03f2043017"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1cf68783fe0cd6ecc5e7a03f2043017">&#9670;&#160;</a></span>parameterVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector shark::LinearRegression::parameterVector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the parameter vector. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#afaa2ba692ab64a0edbff60d7ee6794db">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00077">77</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_linear_regression.html#a1b3c7e48f0eee81cbb99fd05aa3e7571">m_regularization</a>.</p>

</div>
</div>
<a id="a178a2c8fc36f020fd353256fa8d044ab" name="a178a2c8fc36f020fd353256fa8d044ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a178a2c8fc36f020fd353256fa8d044ab">&#9670;&#160;</a></span>regularization()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::LinearRegression::regularization </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00069">69</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_linear_regression.html#a1b3c7e48f0eee81cbb99fd05aa3e7571">m_regularization</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_linear_regression.html#ab4781b500d756133ffc8621ee519c2ae">setRegularization()</a>.</p>

</div>
</div>
<a id="a0685536ee2f4abd6d739ccd86a541c41" name="a0685536ee2f4abd6d739ccd86a541c41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0685536ee2f4abd6d739ccd86a541c41">&#9670;&#160;</a></span>setParameterVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::LinearRegression::setParameterVector </td>
          <td>(</td>
          <td class="paramtype">const RealVector &amp;&#160;</td>
          <td class="paramname"><em>newParameters</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the parameter vector. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#ad5e35d1a10ff36fa72ea787baa40e9ad">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00082">82</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_linear_regression.html#a1b3c7e48f0eee81cbb99fd05aa3e7571">m_regularization</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="ab4781b500d756133ffc8621ee519c2ae" name="ab4781b500d756133ffc8621ee519c2ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4781b500d756133ffc8621ee519c2ae">&#9670;&#160;</a></span>setRegularization()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::LinearRegression::setRegularization </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>regularization</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00072">72</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_linear_regression.html#a1b3c7e48f0eee81cbb99fd05aa3e7571">m_regularization</a>, <a class="el" href="_exception_8h.html#abd848215f138fc44f696aecb3e417e6c">RANGE_CHECK</a>, and <a class="el" href="classshark_1_1_linear_regression.html#a178a2c8fc36f020fd353256fa8d044ab">regularization()</a>.</p>

</div>
</div>
<a id="a7ca068abe50a7b1eb03305e2cc21c4c5" name="a7ca068abe50a7b1eb03305e2cc21c4c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ca068abe50a7b1eb03305e2cc21c4c5">&#9670;&#160;</a></span>train()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::LinearRegression::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_linear_model.html">LinearModel</a>&lt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, RealVector &gt; const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="reference">Referenced by <a class="el" href="linear__regression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a1b3c7e48f0eee81cbb99fd05aa3e7571" name="a1b3c7e48f0eee81cbb99fd05aa3e7571"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b3c7e48f0eee81cbb99fd05aa3e7571">&#9670;&#160;</a></span>m_regularization</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::LinearRegression::m_regularization</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_linear_regression_8h_source.html#l00092">92</a> of file <a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_linear_regression.html#ac1cf68783fe0cd6ecc5e7a03f2043017">parameterVector()</a>, <a class="el" href="classshark_1_1_linear_regression.html#a178a2c8fc36f020fd353256fa8d044ab">regularization()</a>, <a class="el" href="classshark_1_1_linear_regression.html#a0685536ee2f4abd6d739ccd86a541c41">setParameterVector()</a>, and <a class="el" href="classshark_1_1_linear_regression.html#ab4781b500d756133ffc8621ee519c2ae">setRegularization()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/Trainers/<a class="el" href="_linear_regression_8h_source.html">LinearRegression.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
